import axios from '../request'
export const selectByPage = (page) => axios.get("/api/pub/v2/gdb/selectByPage", {

    params: {
        "page": page

    }

})


export const insert = (
    name,
    sex,
    nation,
    birthDate,
    cardNum,
    tel,
    homeAddress,
    coupleName,
    coupleSex,
    coupleNation,
    coupleBirthDate,
    coupleCardNum,
    coupleHomeAddress,
    coupleTel,
    weddingDate,
    divorcingDate,
    principal,
    interest,
    amount,
    deadlineDate,
    applyDate,
    applyNum,
    allowedNum,
    productName,
    payDay,
    loanTimeLimit,
    loanTimeLimitCircle,
    loanGoal,
    loanMonthRate,
    loanPenaltyRate,
    mortgageNum,
    litigationDate,
    lawsuitNum,
    courtDate,
    courtLocation,
    litigationFee,
    securityFee,
    declaredFee,
    amountFee,
    propertyClue,
    propertyObligee,
    executeDate,
    executeNum,
    executePeople,
    companyName,
    companyAddress,
    legalPersonName,
    lawyerFee,
    loanGrantedDate,
    mortgageRegisterDate,
    lastEndDate) => axios.post("/api/pub/v2/gdb/insert", {
    name,
    sex,
    nation,
    birthDate,
    cardNum,
    tel,
    homeAddress,
    coupleName,
    coupleSex,
    coupleNation,
    coupleBirthDate,
    coupleCardNum,
    coupleHomeAddress,
    coupleTel,
    weddingDate,
    divorcingDate,
    principal,
    interest,
    amount,
    deadlineDate,
    applyDate,
    applyNum,
    allowedNum,
    productName,
    payDay,
    loanTimeLimit,
    loanTimeLimitCircle,
    loanGoal,
    loanMonthRate,
    loanPenaltyRate,
    mortgageNum,
    litigationDate,
    lawsuitNum,
    courtDate,
    courtLocation,
    litigationFee,
    securityFee,
    declaredFee,
    amountFee,
    propertyClue,
    propertyObligee,
    executeDate,
    executeNum,
    executePeople,
    companyName,
    companyAddress,
    legalPersonName,
    lawyerFee,
    loanGrantedDate,
    mortgageRegisterDate,
    lastEndDate
})

export const deleteById = (id) => axios.get("/api/pub/v2/gdb/deleteById", {
    params: {
        "id": id
    }

})

export const update = (
    id,
    name,
    sex,
    nation,
    birthDate,
    cardNum,
    tel,
    homeAddress,
    coupleName,
    coupleSex,
    coupleNation,
    coupleBirthDate,
    coupleCardNum,
    coupleHomeAddress,
    coupleTel,
    weddingDate,
    divorcingDate,
    principal,
    interest,
    amount,
    deadlineDate,
    applyDate,
    applyNum,
    allowedNum,
    productName,
    payDay,
    loanTimeLimit,
    loanTimeLimitCircle,
    loanGoal,
    loanMonthRate,
    loanPenaltyRate,
    mortgageNum,
    litigationDate,
    lawsuitNum,
    courtDate,
    courtLocation,
    litigationFee,
    securityFee,
    declaredFee,
    amountFee,
    propertyClue,
    propertyObligee,
    executeDate,
    executeNum,
    executePeople,
    companyName,
    companyAddress,
    legalPersonName,
    lawyerFee,
    loanGrantedDate,
    mortgageRegisterDate,
    lastEndDate) => axios.post("/api/pub/v2/gdb/update", {

    id,
    name,
    sex,
    nation,
    birthDate,
    cardNum,
    tel,
    homeAddress,
    coupleName,
    coupleSex,
    coupleNation,
    coupleBirthDate,
    coupleCardNum,
    coupleHomeAddress,
    coupleTel,
    weddingDate,
    divorcingDate,
    principal,
    interest,
    amount,
    deadlineDate,
    applyDate,
    applyNum,
    allowedNum,
    productName,
    payDay,
    loanTimeLimit,
    loanTimeLimitCircle,
    loanGoal,
    loanMonthRate,
    loanPenaltyRate,
    mortgageNum,
    litigationDate,
    lawsuitNum,
    courtDate,
    courtLocation,
    litigationFee,
    securityFee,
    declaredFee,
    amountFee,
    propertyClue,
    propertyObligee,
    executeDate,
    executeNum,
    executePeople,
    companyName,
    companyAddress,
    legalPersonName,
    lawyerFee,
    loanGrantedDate,
    mortgageRegisterDate,
    lastEndDate


})

export const selectByNameOrKey = (key, page) => axios.get("/api/pub/v2/gdb/findByNameOrKey", {
    params: {
        "key": key,
        "page": page

    }

})